home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Know Your Hockey - The Greatest Player Resource
/
Know Your Hockey: The Greatest Player Resource.iso
/
hockey
/
director
/
ssqcst.cst
/
00032_Script_VideoControlBar
< prev
next >
Wrap
Text File
|
1998-09-28
|
4KB
|
132 lines
global gClipOut,gControls,gOpning
on puckControl
losepop(window "pop")
if the type of sprite 48 = 0 then exit
set status = the movierate of sprite 48
set the movierate of sprite 48 = 0
put the rect of sprite 2 into limitRect
put the left of limitrect+34 into leftlimit
put the right of limitrect -14 into rightlimit
repeat while the mousedown
put the mouseh into hPos
put max(leftLimit,hPos) into hPos
put min(rightLimit,hPos) into hPos
set the loch of sprite 4= hPos
set frame = (((hpos-leftlimit)*100/( rightlimit -leftlimit ))*gclipout)/100
set the movietime of sprite 48 = frame
updatestage
end repeat
set the movierate of sprite 48 = status
end
--- positions the puck relative to the movietime
--- used by videoplayer and stopstart
--- divides the movie duration and the distance to be moved into 10 units
on puckposition
set l = the left of sprite 2+34
set d = the width of sprite 2-34
set a = d/10
set p =float( the movietime of sprite 48)/float(gClipOut)
set m =integer((p+.03)*10 )
set m =min(10,m)
if the loch of sprite 4 <> l+(a*m) then set the loch of sprite 4 =l+(a*m)
end
--on pointermove
-- set percent = ((the loch of sprite 7-(the left of sprite 6+40)))*gClipOut/195
-- set the movietime of sprite 48 = percent
--end
on StopStart
sound stop 2
puppetsound 0
updatestage
--- for BTG where stop start has to change banner icons
set t = char 1 of the moviename
if t = "b" then
puppetsound 0
resetbanner
end if
if the type of sprite 48 = 0 then exit
if the movierate of sprite 48 = 0 then
-- rewind if you are basically at the end
if the movietime of sprite 48 >=gclipout-30 then set the movietime of sprite 48 = 0
setvideovolume
set the movierate of sprite 48 =1
set the membernum of sprite 3 = member "StopStart" of castlib "SSQCST"
set the blend of sprite 3 to 100
set t = the number of member "puck" of castlib "SSQCST"
else
puckposition
set t = the number of member "puck" of castlib "SSQCST"
set the scriptText of member t = the scriptText of member "PuckScript"of castlib "SSQCST"
set the movierate of sprite 48 =0
set the membernum of sprite 3 = member "play" of castlib "SSQCST"
set the blend of sprite 3 to 100
end if
updatestage
end
-- for help button in BTG
on Stoponly
if the membernum of sprite 48 = 0 then exit
puckposition
set t = the number of member "puck" of castlib "SSQCST"
set the scriptText of member t = the scriptText of member "PuckScript"of castlib "SSQCST"
set the movierate of sprite 48 =0
set the membernum of sprite 3 = member "play" of castlib "SSQCST"
set the blend of sprite 3 to 100
updatestage
end
on resetVideo
set the movierate of sprite 48 = 0
set the movietime of sprite 48 = gclipout
updatestage
set the membernum of sprite 3 = member "play" of castlib "SSQCST"
end
---------------------------Turn the control bar off and on ------------------------
on ControlOn
puckposition
repeat with x = 2 to 5
puppetsprite x,1
end repeat
set the blend of sprite 4 to 100
set the blend of sprite 2 to 100
set the member of sprite 3 = member "StopStart" of castlib "SSQCST"
set the blend of sprite 3 to 100
set t = the number of member "puck" of castlib "SSQCST"
set the scriptText of member t = the scriptText of member "PuckScript"of castlib "SSQCST"
set t = the number of member "StopStart" of castlib "SSQCST"
set the scriptText of member t = the scriptText of member "PuckStartStop" of castlib "SSQCST"
set t = the number of member "play" of castlib "SSQCST"
set the scriptText of member t = the scriptText of member "PuckStartStop"of castlib "SSQCST"
updatestage
set the movierate of sprite 48 = 1
end
on ControlOff
repeat with x = 2 to 5
set the blend of sprite x = 0
end repeat
set t = the number of member "puck"
set the scriptText of member t = Empty
set t = the number of member "StopStart"
set the scriptText of member t = Empty
set t = the number of member "play"
set the scriptText of member t = Empty
end